using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Jeffrey.XThreading
{
    public class XThread
    {
        public XThread(RunTarget rt)
        {
            m_PoolSuspend = false;
            m_PoolRunningSuspend = false;
            m_Stop = false;
            m_Thread = new Thread(XThreadPool.Run);
            m_Target = rt;

            m_Thread.IsBackground = true;
        }
        public XThread()
            : this(null) { }

        internal Thread    m_Thread;
        internal RunTarget m_Target;

        internal volatile Boolean m_PoolRunningSuspend;
        internal volatile Boolean m_PoolSuspend;
        internal volatile Boolean m_Stop;
    }
}
